﻿using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IceDog.JsonDotNet.Model
{
    [JsonObject]
    public class NDirectory : IEnumerable<NFile>
    {
        public string Name { get; set; }
        public NDirectory Parent { get; set; }
        public IList<NFile> Files { get; set; }

        public NDirectory()
        {
            Files = new List<NFile>();
        }

        public IEnumerator<NFile> GetEnumerator()
        {
            return Files.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }
    }
}
